﻿using System;
using System.Linq.Expressions;
using élénkPróbája.assets;

namespace élénkPróbája.validators
{
    public class MaxengthValidator : LengthValidator
    {
        public MaxengthValidator(int max) : this(max, () => Messages.length_error)
        {

        }

        public MaxengthValidator(int max, Expression<Func<string>> errorMessageResourceSelector)
            : base(0, max, errorMessageResourceSelector)
        {

        }

        public MaxengthValidator(Func<object, int> max) :
            this(max, () => Messages.length_error)
        {

        }

        public MaxengthValidator(Func<object, int> max, Expression<Func<string>> errorMessageResourceSelector)
            : base(obj => 0, max, errorMessageResourceSelector)
        {

        }
    }

}